﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddProductAttribute.aspx.cs" Inherits="Admin_AddProductAttribute" %>
<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/jquery.form.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/common.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>
</head>
<body onload='$("#loading").hide()'>
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div>   
<div class="container" id="cpcontainer">
<form name="addform" id="addformAjax"  method="post"  >
<table class="tb">
<tr class="thead"><th colspan="2">
    添加产品属性(<font color='red'>＊</font>为必填,其它选填)<span style="color: #ff0000"></span></th></tr>
	<tr>
	  <td align="right" height="22" width="73">
          产品名称：</td>
	  <td><input readonly="readonly" id="productName_txt" name="productName_txt" size="23" autocomplete="off"  value="" runat="server"  />&nbsp;<font color='red'>＊</font>属性类型：<%=attributeDp("attributeDp")%>	</td>
	</tr>
    <tr>
        <td align="left" height="22" width="73">
            属性名称：</td>
        <td>
            <input id="productAttributeValue_txt" name="productAttributeValue_txt" size="23" autocomplete="off"  value="" runat="server"  /><span style="color: #ff0000">＊</span></td>
    </tr>
	<tr> 
       
		<td height="22" align="left">
            产品属性相关链接：</td>
		<td>&nbsp;<iframe src="FileDownLoad/ZrNet_upload.htm" scrolling="no" topmargin="0" width="300" height="24" marginwidth="0" marginheight="0" frameborder="0"></iframe>
            <span style="color: #ff0000">支持文件类型gif|jpg|bmp|png|pdf，大小5M以下<input id="content" type="hidden" value=""  name="content" runat="server"/></span></td>
           
  </tr>

	 <tr>
   <td style="height: 27px"></td> <td class="forumRow" style="height: 27px" ><input type="button" class="btn" value="确认保存" name="Submit" id="tijiao" runat="server"  />&nbsp;<input type="reset" class="btn" value="清 除">&nbsp;<input type=button class="btn" value="返　回" onClick="javascript:location.href='adminProduct.aspx';"/>
       <input id="Hidden1" runat="server" type="hidden" />
       </td>
  </tr>
</table>
<uc1:adminfoot ID="Adminfoot1" runat="server" />
</form>  
</div>
<script type="text/javascript">
$(document).ready(function(){
    var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
        // other available options: 
         url:       "AddProductAttribute.aspx?action=insert&id="+$("#Hidden1").attr("value"),         // override for form's 'action' attribute 
       // type:        'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: false,        // clear all form fields after successful submit 
        resetForm: false        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
    $('#tijiao').click(function(){       
            $("#loading").show();              
            $('#addformAjax').ajaxSubmit(options);
            return false;
    });
})
function showResponse(msg){ 
    if(msg=="1")
    {
        alert("保存成功!!!");
        location.href=location.href;
    }
    else
    {
        alert(msg); 
        $("#loading").hide();
              
    }
} 
function showRequest(formData, jqForm, options)
 { 
           
	
    return true; 
} 
</script>
</body>
</html>
